//C10:10_5
#include "Monitor.h"
#include <iostream>

void Monitor2Test()
{
    Monitor m1 = Monitor();
    Monitor *pm = &m1;
    static Monitor2 m2 = Monitor2(pm);
    m1.incident();
    m1.print();
    m1.display();
    m1.decrement();
    m1.print();
    m1.display();
    m2.~Monitor2();
}
int main(void)
{
    Monitor m1 = Monitor();
    Monitor *pm1 = &m1;
    Monitor2 m2 = Monitor2(pm1);
    m1.incident();
    m1.print();
    m1.display();
    m1.decrement();
    m1.print();
    m1.display();
    m2.~Monitor2();
    std::cout << "-------Monitro2Test called later------\n";
    Monitor2Test();


}